<template>
	<view class="main">
		<image src="../../static/images/1.png" mode="aspectFill"></image>
		<view class="title">区块链地址</view>
		<view class="des">区块链地址是你在区块链上持有藏品的唯一地址</view>
		<view class="link">{{userInfo.account_address}}</view>
		<view class="copy" @tap="copy">复制地址</view>
	</view>
</template>

<script>
	import {mixin} from '@/Mixins/mixin.js'
	import { mapState, mapMutations } from 'vuex'
	export default {
		mixins:[mixin],
		data() {
			return {
				
			}
		},
		onReady() {
			
		},
		onLoad() {
			
		},
		computed: {
			...mapState(['userInfo'])
		},
		methods: {
			//复制
			copy(){
				uni.setClipboardData({
					data: this.userInfo.account_address,
					showToast: false,
					success: () => {
						console.log('success');
						this.$u.toast('内容已复制到剪切板')
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		min-height: 100vh;
		padding: 30rpx;
		box-sizing: border-box;
		background-color: $nft-bg-color;
		text-align: center;
		image{
			width: 144rpx;
			height: 128rpx;
			margin-top: 100rpx;
		}
		.title{
			font-size: 44rpx;
			font-weight: 400;
			color: #FFFFFF;
			line-height: 62rpx;
			margin-top: 22rpx;
		}
		.des{
			font-size: 24rpx;
			font-weight: 400;
			color: #A0A0A0;
			line-height: 36rpx;
			margin-top: 28rpx;
		}
		.link{
			margin-top: 96rpx;
			font-size: 36rpx;
			font-weight: 400;
			color: #FFFFFF;
			line-height: 52rpx;
			padding: 0 66rpx;
			word-wrap: break-word;
		}
		.copy{
			height: 90rpx;
			background: #EFBE62;
			border-radius: 44rpx;
			font-size: 28rpx;
			text-align: center;
			font-weight: 400;
			color: #333333;
			line-height: 90rpx;
			margin-top: 90rpx;
		}
	}
</style>
